﻿using Microsoft.AspNet.Identity;
using Microsoft.AspNet.Identity.EntityFramework;
using SGIMail.DAL;
using SGIMail.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Mail;
using System.Text;
using System.Threading.Tasks;

namespace SGIMail.DAL
{
    public class ApplicationUserManager<T> : UserManager<ApplicationUser>
    {
        public ApplicationUserManager(IUserStore<ApplicationUser> store)
            :base(store)
        {
        }

        public MailService MailService { get; set; }
    }

    public class MailService : IIdentityMessageService
    {
        public async Task SendAsync(IdentityMessage msg)
        {
            SmtpClient client = new SmtpClient();
            client.Host = "smtp.live.com";
            client.Port = 587;

            await client.SendMailAsync("", "", "", "");
        }

        public async Task SendMailAsync(IdentityMessage msg)
        {
            SmtpClient client = new SmtpClient();
            await client.SendMailAsync("", "", "", "");
        }
    }
}
